import request from '@/utils/request'

// 查询商品图片列表
export function listImg(query) {
  return request({
    url: '/goods/img/list',
    method: 'get',
    params: query
  })
}

// 查询商品图片详细
export function getImg(imgId) {
  return request({
    url: '/goods/img/' + imgId,
    method: 'get'
  })
}

// 查询商品图片详细
export function getImagesByGNumber(gNumber) {
  return request({
    url: '/goods/img/getImagesByGNumber/' + gNumber,
    method: 'get'
  })
}


// 新增商品图片
export function addImg(data) {
  return request({
    url: '/goods/img',
    method: 'post',
    data: data
  })
}

// 修改商品图片
export function updateImg(data) {
  return request({
    url: '/goods/img',
    method: 'put',
    data: data
  })
}

// 删除商品图片
export function delImg(imgId) {
  return request({
    url: '/goods/img/' + imgId,
    method: 'delete'
  })
}

// 查询商品属性值最大顺序值
export function findMaxOrderNum(gNumber) {
  return request({
    url: '/goods/img/findMaxOrderNum/' + gNumber,
    method: 'get'
  })
}